package org.example.consumer.service;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

@Component
public class RemoteHelloServiceFallbackImpl implements RemoteHelloService {
    private final Logger logger = LoggerFactory.getLogger(RemoteHelloServiceFallbackImpl.class);
    private Throwable cause;

    @Override
    public String hello() {
        logger.error("feign 查询信息失败:{}", cause);
        return null;
    }

    public Throwable getCause() {
        return cause;
    }

    public void setCause(Throwable cause) {
        this.cause = cause;
    }

}
